#include "ProxyMode.h"


string Subject::getName()
{
	return m_Name;
}

void RealSubject::request()
{
	cout << "RealSubject to do something" << endl;
}

void ProxySubject::request()
{
	preRequest();
	if (m_pSubject != nullptr)
	{
		m_pSubject->request();
	}
	afterRequest();
}

void ProxySubject::preRequest()
{
	cout << "preRequest" << endl;
}

void ProxySubject::afterRequest()
{
	cout << "afterRequest" << endl;
}
